﻿Public Class PropFormV2
    Inherits WeifenLuo.WinFormsUI.Docking.DockContent


    Dim manager As LayerManager
    Public Sub New(ByRef m As LayerManager)

        ' 此调用是 Windows 窗体设计器所必需的。
        InitializeComponent()

        ' 在 InitializeComponent() 调用之后添加任何初始化。

        manager = m

    End Sub

    Private Sub PropFormV2_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load

    End Sub

    Public Sub SetObject(ByRef o As Object)
        pgLayer.SelectedObject = o



    End Sub

    Public Sub OnLayerSelected(ByVal ln As String)
        Dim lay As Layer
        manager.GetLayer(ln, lay)

        If lay IsNot Nothing Then

            '更新名称
            Me.Text = lay.LdescProperty + "属性"

            Dim ltype As System.Type = lay.GetType()

            'CType(lay, )

            Me.SetObject(lay)

        End If


    End Sub

    Private Sub PropFormV2_FormClosing(ByVal sender As System.Object, ByVal e As System.Windows.Forms.FormClosingEventArgs) Handles MyBase.FormClosing
        'e.Cancel = True
        'Me.Hide()

    End Sub
End Class